package com.github.data_manage.domain.dto

import org.springframework.format.annotation.DateTimeFormat
import java.math.BigDecimal
import java.time.LocalDate

/**
 * 对比指数实体
 *@author CHN
 *@since 2024-08-11 16:02
 */
open class ContrastIndexDto {

    lateinit var name: String

    lateinit var value: BigDecimal

    // 月份,输入格式为 yyyy/MM,数据库中为当月第一天 如excel中为 2024/08,则数据库中为 2024/08/01
    @DateTimeFormat(pattern = "yyyy-MM")
    var time: LocalDate? = null

    constructor()

    constructor(
        name: String,
        value: BigDecimal,
        time: LocalDate?
    ) {
        this.name = name
        this.value = value
        this.time = time
    }

}
